﻿namespace VoiceDominion
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;

    public class MetaCommands : IModule
    {
        public void ProcessCommand(Dictionary<string, string> parameters)
        {
            switch (parameters["command"])
            {
                case "ReloadGrammar":
                    Speech.Instance.TextToSpeech.SpeakAsync("Reloading the speech grammar");
                    Speech.Instance.ReloadGrammar();
                    Speech.Instance.TextToSpeech.SpeakAsync("The speech grammar has been reloaded");
                    break;
                default:
                    ////TODO: log
                    Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "Unrecognized command: {0}", parameters["command"]));
                    break;
            }
        }
    }
}
